<?php session_start();  ?>
<!--e<script type="text/javascript" src="js/jquery-1.4.2.js"></script>
<SCRIPT type="text/javascript" src="js/jquery.easing.1.3.js"></SCRIPT>
<SCRIPT type="text/javascript" src="js/alertbox.js"></SCRIPT>
<LINK rel="stylesheet" type="text/css" media="all" href="css/style.css">stilo de ventana alerta -->

<script type="text/javascript">
$(document).ready(function(){
//Para ver el detalle del financiamiento del producto
  /*   $(".elimPago").click(function(){
		csscody.confirm("esta seguro de eliminar el pago?");
		return false;
  e.preventDefault();
    var that = this;
    var text = "si o no compa ";
    csscody.confirm(text, {
        onComplete:function(e){
          if(e){
                window.location = $(that).attr('href');
          }else{
                return false;
          }
        }
    });
   });*/
});
 </script>
<script language="javascript">
<!--

	function confirmLink(url, msg,theLink) {
		if (confirm(msg)) {
			theLink.href = url;
			return true;
		}
		return false;
	}
-->
</script>

<?php
require_once('Connections/tecno.php'); 
include('scripts/fechaMysqlNormal.php');
if(!isset($_REQUEST['id'])){
	 $_REQUEST['id']= $_SESSION['idCliente'];
	
	}
$id = $_REQUEST['id'];

include('sql_pagos1.php'); ?>

<div id="detalle" style="height:auto; min-height:225px;">
<?php  if($totalRows_detallespagos > 0) { ?>
<table cellspacing="3" width="750px">
<tr>
		<td class='tituloTabla'>N</td>
		<td class='tituloTabla'>Fecha</td>
		<td class='tituloTabla'>Monto</td>
		<td class='tituloTabla'>Forma</td>
   		<td class='tituloTabla'>Nro</td>
        <td class='tituloTabla'>Art&iacute;culo</td>
<?php if ($id==""){ ?>
        <td class='tituloTabla'>Cliente</td>
<?php }?>
</tr>
    <?php $n =1; do {  ?>
<tr class="rowTabla">
        <td><?php echo $n;?>. </td>
        <td><?php echo cambiaf_a_normal($row_detallespagos['fecha']);?></td>
        <td><?php echo $row_detallespagos['cantidad']; ?></td>
        <td><?php echo $row_detallespagos['formaPago']; ?></td>
        <td><?php echo $row_detallespagos['nro']; ?></td>
        <td><?php echo $row_detallespagos['productoDes']; ?></td>
<?php if ($id==""){ ?>
        <td><?php echo $row_detallespagos['cedula']." - ".$row_detallespagos['primerApellido'].", ".$row_detallespagos['nombres']; ?></td>
<?php }?>
      </tr>
    <?php $n = $n+1; } while ($row_detallespagos = mysql_fetch_assoc($detallespagos)); ?>
</table>
<?php }else{ ?>
<p><span style="text-align:center;" class="ui-widget-header">No existen reportes pagos!</span></p>
<?php } ?>
</div>